import Axios from 'axios';

export function request(config) {
  // 创建 axios 实例
  const axios = Axios.create({
    baseURL: "http://123.207.32.32:8000",
    timeout: 5000
  });

  // 请求拦截
  axios.interceptors.request.use(
    config => {
      return config;
    },
    err => {
    }
  );

  // 响应拦截
  axios.interceptors.response.use(
    res => {
      return res.data
    },
    err => {
      console.log(err);
    }
  )
  return axios(config);
}




